package com.cloudsigns.factorymanager2.produce.fragment;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.cloudsigns.factorymanager2.R;
import com.cloudsigns.factorymanager2.engineering.customview.ListViewForScrollView;
import com.cloudsigns.factorymanager2.produce.adapter.ProduceHandoverStatusAdapter;

public class ProduceHandoverStatusFragment extends Fragment implements View.OnClickListener {
    private TextView tv_product_name, tv_engineering_name, tv_project_name, tv_order_information, tv_last_workpart;
    private ListViewForScrollView listView;
    private RelativeLayout rl_last_workpart;
    private Button btn_submit;

    private ProduceHandoverStatusAdapter adapter;

    // listview item 点击跳转 ProduceHandoverStatusInformationActivity

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_produce_handover_status, null);
        tv_product_name = view.findViewById(R.id.tv_product_name);
        tv_engineering_name = view.findViewById(R.id.tv_engineering_name);
        tv_project_name = view.findViewById(R.id.tv_project_name);
        tv_order_information = view.findViewById(R.id.tv_order_information);
        listView = view.findViewById(R.id.lv);
        tv_last_workpart = view.findViewById(R.id.tv_last_workpart);
        rl_last_workpart = view.findViewById(R.id.rl_last_workpart);
        btn_submit = view.findViewById(R.id.btn_submit);

        tv_order_information.setOnClickListener(this);
        rl_last_workpart.setOnClickListener(this);
        btn_submit.setOnClickListener(this);

        adapter=new ProduceHandoverStatusAdapter(getActivity());

        return view;
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            // 工单信息
            case R.id.tv_order_information:
                break;
            // 最后一道工序
            case R.id.rl_last_workpart:
                break;
            // 确认
            case R.id.btn_submit:
                break;
        }
    }
}
